package com.gxa.service.impl;

import com.gxa.common.R;
import com.gxa.mapper.LoginMapper;
import com.gxa.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class LoginServiceImpl implements LoginService {
    @Autowired(required = false)
    private LoginMapper loginMapper;

    @Override
    @Transactional(rollbackFor = Exception.class)
    public R loginEmployee(String employee_login, String employee_password) {
        loginMapper.loginEmployee(employee_login,employee_password);
        R r = new R();
        r.setCode(200);
        r.setMsg("登录成功");
        return r;
    }
}
